<?php
//文档地址 https://zhuanlan.zhihu.com/p/139203408 
1.composer.json配置阿里云组件包
在require中添加"mrgoon/aliyun-sms": "dev-master"
“require”: {    
    “php”: “^7.1.3”,   
    “fideloper/proxy”: “^4.0”,    
    “laravel/framework”: “5.8.*”,    
    “laravel/tinker”: “^1.0”,
    "mrgoon/aliyun-sms": "dev-master"
}
然后执行命令：
composer update
composer dumpautoload

2.在.env文件中配置常量
'access_key'    => env('ALIYUN_SMS_AK', '填你自己的'),     
'access_secret' => env('ALIYUN_SMS_AS', '填你自己的'), 
ALIYUN_SMS_SIGN_NAME 私钥

3.使用 
use Mrgoon\AliSms\AliSms;

$sms  =  new AliSms();
$sms->sendSms($phone,$template_code,['code'=> $mobile_code]);

